﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;

/// <summary>
/// 上传宝贝
/// </summary>
public class TB_UploadBB
{
    public TB_UploadBB()
    {       
    }
    /// <summary>
    /// 上传宝贝
    /// </summary>    
    public BS2.BSTaobaoAPI.BSTaobaoItemAddBus UploadBaoBei(string username,string password,string appkey,string certcode,string sessionId,string [,] param,byte [] img)
    {
        BS2.BSTaobaoAPI.TaobaoAPI.setAPPID(appkey);
        BS2.BSTaobaoAPI.TaobaoAPI.setCERTCODE(certcode);
        BS2.BSTaobaoAPI.TaobaoAPI.setLoginPro(username, password);
        BS2.BSTaobaoAPI.TaobaoAPI.setSessionID(sessionId);
        //XmlDocument xml = BS2.BSTaobaoAPI.TaobaoAPI.getXmlFromAddORUpdateBaobei(param, img, certcode);
        BS2.BSTaobaoAPI.BSTaobaoItemAddBus addBus = BS2.BSTaobaoAPI.BSTaobaoBussinessAPI.getTaobaoBaobeiAdd(param, img, appkey, certcode, sessionId);
        return addBus;
    }
}
